/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.List;
import com.jeesite.common.collect.ListUtils;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 生产领料Entity
 * @author HOHD
 * @version 2020-12-22
 */
@Table(name="st_product_material_form_bill", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="bill_no", attrName="billNo", label="单据号"),
		@Column(name="bill_date", attrName="billDate", label="单据日期"),
		@Column(name="tally_date", attrName="tallyDate", label="入账日期"),
		@Column(name="dept_code", attrName="deptCode", label="部门编码"),
		@Column(name="dept_name", attrName="deptName", label="部门", queryType=QueryType.LIKE),
		@Column(name="bar_code", attrName="barCode", label=""),
		@Column(name="approve_state", attrName="approveState", label=""),
		@Column(name="approve_man_code", attrName="approveManCode", label=""),
		@Column(name="approve_man_name", attrName="approveManName", label=""),
		@Column(name="product_bill_ids", attrName="productBillIds", label=""),
		@Column(name="ramarks", attrName="ramarks", label="备注"),
	}, orderBy="a.id DESC"
)
public class StProductMaterialFormBill extends DataEntity<StProductMaterialFormBill> {
	
	private static final long serialVersionUID = 1L;
	private String billNo;		// 单据号
	private Date billDate;		// 单据日期
	private Date tallyDate;		// 入账日期
	private String deptCode;		// 部门编码
	private String deptName;		// 部门
	private String barCode;//二维码

	private Integer approveState;
	private String approveManCode;
	private String approveManName;
	private String productBillIds;
	private String ramarks;		// 备注
	private List<StProductMaterialFormBillDetail> stProductMaterialFormBillDetailList = ListUtils.newArrayList();		// 子表列表
	
	public StProductMaterialFormBill() {
		this(null);
	}

	public StProductMaterialFormBill(String id){
		super(id);
	}
	public String getProductBillIds() {
		return productBillIds;
	}

	public void setProductBillIds(String productBillIds) {
		this.productBillIds = productBillIds;
	}
	public Integer getApproveState() {
		return approveState;
	}

	public void setApproveState(Integer approveState) {
		this.approveState = approveState;
	}

	public String getApproveManCode() {
		return approveManCode;
	}

	public void setApproveManCode(String approveManCode) {
		this.approveManCode = approveManCode;
	}

	public String getApproveManName() {
		return approveManName;
	}

	public void setApproveManName(String approveManName) {
		this.approveManName = approveManName;
	}

	public String getBarCode() {
		return barCode;
	}

	public void setBarCode(String barCode) {
		this.barCode = barCode;
	}

	@Length(min=0, max=20, message="单据号长度不能超过 20 个字符")
	public String getBillNo() {
		return billNo;
	}

	public void setBillNo(String billNo) {
		this.billNo = billNo;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getBillDate() {
		return billDate;
	}

	public void setBillDate(Date billDate) {
		this.billDate = billDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getTallyDate() {
		return tallyDate;
	}

	public void setTallyDate(Date tallyDate) {
		this.tallyDate = tallyDate;
	}
	
	@Length(min=0, max=20, message="部门编码长度不能超过 20 个字符")
	public String getDeptCode() {
		return deptCode;
	}

	public void setDeptCode(String deptCode) {
		this.deptCode = deptCode;
	}
	
	@Length(min=0, max=20, message="部门长度不能超过 20 个字符")
	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
	
	@Length(min=0, max=500, message="备注长度不能超过 500 个字符")
	public String getRamarks() {
		return ramarks;
	}

	public void setRamarks(String ramarks) {
		this.ramarks = ramarks;
	}
	
	public List<StProductMaterialFormBillDetail> getStProductMaterialFormBillDetailList() {
		return stProductMaterialFormBillDetailList;
	}

	public void setStProductMaterialFormBillDetailList(List<StProductMaterialFormBillDetail> stProductMaterialFormBillDetailList) {
		this.stProductMaterialFormBillDetailList = stProductMaterialFormBillDetailList;
	}
	
}